package com.source.hotelbath.weight.listview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;


import com.source.hotelbath.weight.listview.ptr.ptrloadmore.PtrLoadMoreListView;

import in.srain.cube.views.ptr.PtrFrameLayout;
import in.srain.cube.views.ptr.PtrHandler;

/**
 * Created by kinglong on 2016/4/20.
 */
public class LoadMoreListview extends PtrLoadMoreListView {

    public LoadMoreListview(Context context) {
        super(context);
        stopPtr();
    }

    public LoadMoreListview(Context context, AttributeSet attrs) {
        super(context, attrs);
        stopPtr();
    }

    private void stopPtr(){
        mPtrFrame.setPtrHandler(new PtrHandler() {
            @Override
            public boolean checkCanDoRefresh(PtrFrameLayout frame, View content, View header) {
                return false;
            }
            @Override
            public void onRefreshBegin(PtrFrameLayout frame) {
            }
        });
    }

    public void setPageIndex(int pageIndex){
        this.mPageIndex=pageIndex;
    }
}
